package org.shangma.exercise;

/**
 * @classname:demo04
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/24 18:59
 * @version: 0.1
 * @since:1.8
 */
public class demo04 {
    //    自己给定5个整数，通过编程求出最大值(使用三元运算符)
    public static void main(String[] args) {
         int a = 10,b= 20,c = 30,d = 40,e = 50;
         int max = (a>b)?a:b;
          max = (max>c)?max:c;
          max = (max>d)?max:d;
          max = (max>e)?max:e;
        System.out.println(max);

    }
}
